# -*- coding: UTF-8 -*-
# filename: yangsy.py

import datetime
import os

d1 = datetime.datetime(2021,1,18)
d2 = datetime.datetime.now()
D_num = (d2-d1).days + 1
print('今天是打卡的第{}天 '.format(D_num))

current_dir = os.getcwd()
dir_name = os.path.join(current_dir,'{}'.format(D_num))
if os.path.exists(dir_name):
    print("当前目录已存在")
else:
    os.mkdir(dir_name)

fold_name = os.path.join(dir_name,r'yangsy.py')
if os.path.exists(fold_name):
    print('当前文件已存在')
else:
    fd = open(fold_name,mode='w',encoding='utf_8')
    fd.close()
